<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="cmd.css" rel="stylesheet" type="text/css">
<title>GRUB4DOS 其他菜单解释2</title>
</head>

<body>
<p><a href="./GRUB4DOS9-1菜单解释_内置.htm">内置菜单详解 </a><span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="./GRUB4DOS9-2菜单解释_外置.htm">外置菜单详解</a> <span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="./GRUB4DOS9-3菜单解释_其他1.htm">其他菜单详解1</a> <span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>其他菜单详解2 <span class="Notes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="./GRUB4DOS9-5菜单解释_其他3.htm">其他菜单详解3</a></p>
<h2>其他菜单文件详解-2</h2>
<p>#====================<strong>&nbsp;初始化命令组</strong>（菜单头）部分=========================</p>
<p><span class="bat">debug</span> <strong>off</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;关闭debug模式</span>  <br>
  <span class="bat">checkrange</span> <strong>0x21</strong> <span class="bat">read</span> <strong>0x8280</strong> <span class="Options">&amp;&amp;</span> <span class="bat">pxe keep</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;检测当前是否为pxe启动，是的话执行 pxe keep</span><span class="Notes"> 命令</span>  <br>
  <span class="bat">command</span> <span class="Options">--set-path=</span><strong>(bd)/GRUB/</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置外部命令所在位置（默认位置是/BOOT/GRUB/）</span>  <br>
  <span class="bat">color</span> <strong>white/blue blue/yellow light-red/blue 10</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单颜色</span>  <br>
  <span class="bat">default</span> <strong>1</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置默认启动项</span>  <br>
  <span class="bat">password</span> <span class="Options">--md5</span> <strong>$1$j3M3$UCvLwNAO7wmLQXnYtJQMv1</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;设置全局密码</span></p>
<p>#====================<strong>菜单项</strong>（菜单正文）=================================</p>
<p><span class="Options">title</span> <strong>[01] Boot from First CD-ROM <span class="Options">\n</span>Boot from CD-ROM</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题，&quot; \n &quot;后为菜单底部帮助信息，从第一光驱启动 </span>  <br>
  <span class="bat">cdrom</span> <span class="Options">--init</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;初始化ATAPI接口的CDROM设备 </span>  <br>
  <span class="bat">map</span> <span class="Options">--hook</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;使仿真生效</span>  <br>
<span class="bat">chainloader</span> <strong>(cd0)</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;从第一光驱设备启动<br>
<span class="bat">boot</span><br>
#&nbsp;&nbsp;&nbsp;确定进行启动，菜单中可以省略该句，命令行模式下不可省略</span></p>
<p><span class="Options">title</span> <strong>[02] Boot from Second CD-ROM <span class="Options">\n</span>Boot from CD-ROM</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题，&quot; \n &quot;后为菜单底部帮助信息，从第二光驱启动 </span>  <br>
  <span class="bat">cdrom</span> <span class="Options">--init</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;初始化ATAPI接口的CDROM设备 </span> <br>
  <span class="bat">map</span> <span class="Options">--hook</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;使仿真生效</span> <br>
  <span class="bat">chainloader</span> <strong>(cd1)</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;从第二光驱设备启动<br>
  <span class="bat">boot</span><br>
#&nbsp;&nbsp;&nbsp;确定进行启动，菜单中可以省略该句，命令行模式下不可省略</span></p>
<p><span class="Options">title</span> <strong>[03] Boot from First Hard Drive<span class="Options"> \n</span>Boot From HDD</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题，&quot; \n &quot;后为菜单底部帮助信息，从第一磁盘启动 </span>  <br>
  <span class="bat">root</span> <strong>(hd0,0)</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;将第一磁盘的第一主分区设置为根</span>  <br>
<span class="bat">chainloader </span><strong>+1</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;加载当前设备（第一磁盘的第一主分区）的第一扇区</span><br>
<span class="bat">boot</span><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;确定进行启动，菜单中可以省略该句，命令行模式下不可省略</span></p>
<p><span class="Options">title</span> <strong>[04] Boot from Second Hard Drive<span class="Options"> \n</span>Boot From HDD</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题，&quot; \n &quot;后为菜单底部帮助信息，从第二磁盘启动 </span>  <br>
  <span class="bat">map</span><strong> (hd1) (hd0)</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;将第二磁盘（hd1）映射为第一磁盘（hd0）</span>  <br>
  <span class="bat">map</span> <strong>(hd0) (hd1)</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;将第一磁盘（hd0）映射为第二磁盘（hd1）</span><br>
  <span class="bat">map </span><span class="Options">--hook</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;使仿真生效，至此磁盘交换完成，第二磁盘和第一磁盘位置互换  </span><br>
  <span class="bat">rootnoverify</span><strong> (hd0,0)</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;将第一磁盘的第一主分区设置为根，不测试是否为可识别的文件格式 </span> <br>
  <span class="bat">makeactive</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置当前设备为活动分区，注意：仅对   PC 的硬盘主分区有效</span><br>
  <span class="bat">chainloader </span><strong>+1</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;加载当前设备（第一磁盘的第一主分区）的第一扇区</span><br>
  <span class="bat">boot</span><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;确定进行启动，菜单中可以省略该句，命令行模式下不可省略</span></p>
<p><span class="Options">title</span> <strong>[05] Load Syslinux Menu</strong>  <br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题，grub4dos菜单 转 syslinux菜单</span><br>
  <span class="bat">if</span> <span class="Options">not exist</span> <strong>/BOOT/ISOLINUX.BIN</strong> <span class="Options">&amp;&amp;</span> <span class="bat">find</span> <span class="Options">--set-root</span><strong> /BOOT/ISOLINUX.BIN</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;如果当前设备/BOOT/目录下没有ISOLINUX.BIN文件，就在所有设备上寻找/BOOT/ISOLINUX.BIN文件</span> <span class="Notes">，并将找到的设备设为根</span>  <br>
<span class="bat">chainloader</span> <strong>/BOOT/ISOLINUX.BIN</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;加载/BOOT/ISOLINUX.BIN文件</span> <br>
<span class="bat">boot</span><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;确定进行启动，菜单中可以省略该句，命令行模式下不可省略</span></p>
<p><span class="Options">title</span> <strong>[06] Load Ezboot Menu</strong> <br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题 ，grub4dos菜单 转 ezboot菜单 </span><br>
  <span class="bat">if</span> <span class="Options">not exist</span> <strong>/BOOT/LOADER.BIN</strong> <span class="Options">&amp;&amp;</span> <span class="bat">find</span> <span class="Options">--set-root</span><strong> /BOOT/LOADER.BIN</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;如果当前设备/BOOT/目录下没有LOADER.BIN文件，就在所有设备上寻找/BOOT/LOADER.BIN文件</span> <span class="Notes">，并将找到的设备设为根</span>  <br>
<span class="bat">chainloader</span> <span class="Options">--force</span> <strong>/BOOT/LOADER.BIN</strong><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;强制加载/BOOT/LOADER.BIN文件</span> <br>
<span class="bat">boot</span><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;确定进行启动，菜单中可以省略该句，命令行模式下不可省略</span></p>
<p><span class="bat">title</span> <strong>[07] Back to Main menu</strong><br>
  <span class="Notes">#&nbsp;&nbsp;&nbsp;设置菜单项标题，返回主菜单 </span>  <br>
<span class="bat">configfile</span><span class="Options"> (md)4+8</span><br>
<span class="Notes">#&nbsp;&nbsp;&nbsp;固定用法，实际效果为再次加载预置菜单（内置菜单），可作为通用写法，grub4dos环境下可以随时返回到主菜单， <br>
#&nbsp;&nbsp;&nbsp;可参见命令索引 configfile 命令部分。</span></p>
<p>&nbsp;</p>
<p>补充内容：</p>
<p>1.1、ezb菜单转grub4dos菜单：bcdw /boot/grldr.bin<br>
1.2、ezb菜单转syslinux菜单：bcdw /boot/isolinux.bin</p>
<p>2.1、syslinux菜单转ezb菜单：<br>
LABEL ezboot<br>
MENU LABEL [^L] -- <br>
kernel /boot/loader.bin</p>
<p>2.2、syslinux菜单转grub4dos菜单：<br>
  LABEL grldr<br>
  MENU LABEL [^G] -- <br>
  kernel /boot/grldr.bin</p>
<p>&nbsp;</p>
</body>
</html>
